package com.example.admin.yuejian21.Model;





import com.example.admin.yuejian21.Bean.AskList;
import com.example.admin.yuejian21.Bean.Master;
import com.example.admin.yuejian21.Bean.MasterDetail;
import com.example.admin.yuejian21.Bean.VideoList;
import com.example.admin.yuejian21.Service.MasterService;
import com.example.admin.yuejian21.Service.Service;

import java.util.List;

import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by Lee1 on 2017/10/23.
 */

public class MasterModel {
    private Retrofit retrofit;
    public MasterModel(){
        retrofit = new Retrofit.Builder()
                .addConverterFactory(GsonConverterFactory.create())
                .baseUrl("http://172.24.10.175/workout/api.php/")
                .build();
    }
    public Call<List<Master>> getMasterList(String s){
        MasterService Service = retrofit.create(MasterService.class);
        return Service.getMasterList();
    }
    public Call<MasterDetail> getMasterDetail(String id){
        MasterService Service = retrofit.create(MasterService.class);
        return Service.getMasterDetail("um22daeuj1859g6bljcjruk9g0","master",id);
    }
    public Call<List<AskList>> getAskList(String master_id){
        MasterService Service = retrofit.create(MasterService.class);
        return Service.getAskList(master_id);
    }
    public Call<VideoList> getVideoList(String Id, String map){
       MasterService Service = retrofit.create(MasterService.class);
        return Service.getVideoList(Id,map);
    }


}

